From: Katsumi Yamaoka Date: Thu, 25 Nov 2010 23:20:19 +0000 (+0000) Subject: message.el (message-called-interactively-p): A temporary macro. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~5529 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=dc9e098fcfc4abf01e4f247587ad7884c32516d7;p=emacs.git message.el (message-called-interactively-p): A temporary macro. message.el (message-goto-body): Use it temporarily. --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 0a6925891a2..8ffa2be050b 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2010-11-25 Katsumi Yamaoka + + * message.el (message-called-interactively-p): A temporary macro. + (message-goto-body): Use it temporarily. + 2010-11-25 Lars Magne Ingebrigtsen * nnimap.el (nnimap-unfold-quoted-lines): Refactor out. diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index bd6aa82b77a..1ee07a2d5ee 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -3047,10 +3047,22 @@ M-RET `message-newline-and-reformat' (break the line and reformat)." (interactive) (message-position-on-field "Summary" "Subject")) +(eval-when-compile + (defmacro message-called-interactively-p (kind) + (condition-case nil + (progn + (eval '(called-interactively-p 'any)) + ;; Emacs >=23.2 + `(called-interactively-p ,kind)) + ;; Emacs <23.2 + (wrong-number-of-arguments '(called-interactively-p)) + ;; XEmacs + (void-function '(interactive-p))))) + (defun message-goto-body () "Move point to the beginning of the message body." (interactive) - (when (and (called-interactively-p 'any) + (when (and (message-called-interactively-p 'any) (looking-at "[ \t]*\n")) (expand-abbrev)) (goto-char (point-min))